class TFCMProj extends TFProjectile;

simulated function PostBeginPlay()
{
    Velocity = Vector(Rotation) * speed;
    if (PhysicsVolume.bWaterVolume)
        Velocity *= 0.9;

    Super.PostBeginPlay();
}

simulated function ProcessTouch (Actor Other, vector HitLocation)
{
    local float dump;

    if (Other != Instigator)
    {
        if ( Role == ROLE_Authority )
        {
            if ( Other.GetClosestBone( HitLocation, vector(rotation), dump, 'head', 8 ) == 'head' )
            {
                Other.TakeDamage(Damage * 2.5, Instigator, HitLocation,
                (MomentumTransfer * Velocity/speed), class'Taskforces.DamTypeCMProjHead');
            }
            else
            {
                Other.TakeDamage( damage, Instigator, HitLocation,
                (MomentumTransfer * Velocity/speed), MyDamageType );
            }
        }


        Destroy();
    }
}

simulated function Landed( Vector HitNormal )
{
    SetPhysics(PHYS_None);
    Destroy();
}

simulated function HitWall( vector HitNormal, actor Wall )
{
    if ( (Mover(Wall) != None) && Mover(Wall).bDamageTriggered )
    {
        if ( Level.NetMode != NM_Client )
        {
            Wall.TakeDamage( Damage, instigator, Location, MomentumTransfer * Normal(Velocity), MyDamageType);
        }
   }
    Spawn(class'TaskForces.TFCMImpact',,,,rotator(hitnormal));
    Spawn(class'TaskForces.TFCMImpactSmoke',,,,rotator(hitnormal));

    Destroy();
}

simulated function PhysicsVolumeChange( PhysicsVolume Volume )
{
    if (Volume.bWaterVolume)
    {
        Velocity *= 0.9;
    }
}

defaultproperties
{
     Speed=10000.000000
     MaxSpeed=8000.000000
     Damage=20.000000
     MomentumTransfer=15000.000000
     MyDamageType=Class'taskforces.DamTypeCMProj'
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'TFMedia.fX.tfBullet'
     LifeSpan=20.000000
     DrawScale3D=(X=1.500000,Y=0.700000,Z=0.700000)
     PrePivot=(X=20.000000)
     AmbientGlow=255
     Style=STY_Additive
     bFixedRotationDir=True
     RotationRate=(Roll=200000)
}
